Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worksheet improvements #5277

Merged
merged 4 commits into from Oct 17, 2018
Merged

Conversation

smarter
Copy link
Member

@smarter smarter commented Oct 17, 2018

No description provided.

This makes it possible to run the worksheet without saving the document
or manually running the dotty.worksheet.run command. The new UI is also less
distracting since you don't get a notification pop-up every time the
worksheet is being run.
This is unreliable because we change the document by adding newlines
when we receive a multi-line result for a given line of the worksheet
This way we can be sure that our output is readable in all themes.
@Duhemm
Copy link
Contributor

Duhemm commented Oct 17, 2018

I just noticed that cancellation doesn't work if the buffer has been changed:

val foo = 0
1 to 10 foreach println
while(true) {}

A worksheet in an infinite loop shouldn't block the whole language
server from responding to queries. We just need to be careful to lock
the language server when operating on trees since these operations may
not be thread-safe (for example, when a symbol gets forced). We could
also allow running multiple worksheets at the same time but this commit
doesn't implement that.
@smarter smarter merged commit 965a2c0 into scala:master Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants